package com.heima.model.common.dtos;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;

@Data
@Slf4j
public class                                                                                                                           PageRequestDto<T> {

    protected Integer size=10;
    protected Integer page=1;
    //用于多条件查询
    protected T body;

    public Integer getSize() {
        return size==null?10:size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    public Integer getPage() {
        return (page==null||page<=0)?1:page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public T getBody() {
        return body;
    }

    public void setBody(T body) {
        this.body = body;
    }
}
